﻿@model Web.Models.LoginData 

@{
    ViewBag.Title = "Login";
    Layout = "~/Views/Shared/BodyLayout.cshtml";
}



    <div class="login">

    @if (ViewBag.AuthenticatedUserName != null)
    {
        <div class="accessDenied">
            Jesteś zalogowany jako @ViewBag.AuthenticatedUserName <br />
            Nie posiadasz uprawnień do wybranej strony
        </div>
        <a href="/" id="buttonBack" class="loginButton">Powrót</a>
        <a href="/account/register" id="buttonRegister" class="loginButton">Załóż konto</a>
    }
    else
    {
        using (Html.BeginForm())
        { 
            <div class="form" style="width: 350px;">
                <div class="formtitle">Logowanie</div>
                
                <div class="input">
				    <div class="inputtext">Email: </div>
                    <div class="inputcontent">
                        @Html.TextBoxFor(m => m.UserEmail)
                        <div class="inputcontenterror">
                            @Html.ValidationMessageFor(model => model.UserEmail)
                        </div>
                    </div>
                </div>
                
                <div class="input">
				    <div class="inputtext">Hasło: </div>
                    <div class="inputcontent">
                        @Html.PasswordFor(m => m.Password)
                        <div class="inputcontenterror">
                            @Html.ValidationMessageFor(model => model.Password) 
                        </div>
                    </div>
                </div>

                <div class="buttons">
				    <input class="orangebutton" type="submit" value="Loguj" />
                    <a href="/" id="buttonBack" class="loginButton" style="color: Gray">Powrót</a>
                    <a href="/account/register" id="buttonRegister" class="loginButton" style="color: Gray">Załóż konto</a>
			    </div>

            </div>
        
        
            <div class="ResultError">@Html.ValidationSummary()</div>
            
        } 
    }

    </div>